﻿Public Class KNHeSo
    Private Sql As String
    Private dt As New Database_
    Public Function DSHS() As DataTable
        Sql = "select * from HESO"
        Dim data As DataTable = dt.execQuery(Sql)
        Return data
    End Function
    Public Function SaveHS(ByVal data As DataTable) As Boolean
        Sql = "select * from HESO "
        Return dt.ExecUpdate(Sql, data)
    End Function
    Public Function DKDSHS(ByVal str As String) As String
        Sql = "select h.HeSo from HESO h where h.MaNV='" & str & "'"
        Dim data As DataTable = dt.execQuery(Sql)
        Dim kq As String = "0"
        For Each dr As DataRow In data.Rows
            kq = dr("HeSo")
        Next
        Return kq
    End Function
End Class
